<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="core" %>
<%@ taglib prefix="fmt" uri="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<!-- basic styles -->

		<link href="<%=path%>/page/back/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/font-awesome.min.css" />

		<!--[if IE 7]>
		  <link rel="stylesheet" href="<%=path%>/page/back/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- fonts -->
		<script src="<%=path%>/page/back/assets/js/bootstrap.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/typeahead-bs2.min.js"></script>
		

		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace.min.css" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-skins.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="<%=path%>/page/back/assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->

		<script src="<%=path%>/page/back/assets/js/ace-extra.min.js"></script>

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="<%=path%>/page/back/assets/js/html5shiv.js"></script>
		<script src="<%=path%>/page/back/assets/js/respond.min.js"></script>
		<![endif]-->
		<style type="text/css">
			#fengye{
				width:300px;
				height:40px;
				margin:0 auto;
				text-algin:center;
			}
			#fengul{
				display:block;
				width:300px;
				height:40px;
				margin:0px auto;
			}
			#fengul li{
				display:block;
				width:50px;
				height:40px;
				margin:0px 10px;
				text-align:center;
				float:left;
			}
			#fengul li a{
				display:block;
				widht:50px;
				height:40px;
				text-decoration:none;
				line-height:40px;
				text-align:center;
			}
			#fengul li a:hover{
				text-decoration:underline;
			}
		</style>
	</head>

	<body style="background:#fff;">
		<div class="col-xs-12">
			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS --><br/>

					<div class="row">
						<div class="col-xs-12">
							<div class="table-header">
								<div class="row" >
									<div class="col-sm-6">
										<div id="sample-table-2_length" class="dataTables_length" >
											&nbsp;
										</div>
									</div>
									<div class="col-sm-6">
										<div id="sample-table-2_length" class="dataTables_length" style="height:45px;">
											<div class="nav-search" id="nav-search">
												<form class="form-search" action="../diser/lis.html" method="post">
													<span class="input-icon">
														<input type="text" name="key" value="${key}" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
														<i class="icon-search nav-search-icon"></i>
														<button class="btn btn-sm btn-primary" type="submit">搜索</button>
													</span>
												</form>
											</div><!-- #nav-search -->
										</div>
									</div>
								</div>
							</div>
							

							<div class="table-responsive">
								<table class="table table-striped table-bordered table-hover">
									<thead>
										<tr>
											<th> 编号 </th>
											<th> 版主 </th>
											<th> 内容 </th>
											<th> 发起时间 </th>
											<th> 类型 </th>
											<th> 回复数 </th>
											<th> 浏览量 </th>
											<th> 删除 </th>
										</tr>
									</thead>

									<tbody>
										<c:forEach items="${page.list}" var="all">
											<tr>
												<td class="center"> <b>${all.drId}</b> </td>
												<td>
													<c:if test="${all.users.uName==null}">该用户已注销</c:if>
													<c:if test="${all.users.uName!=null}"><a href="../user/see/${all.users.uId}.html">${all.users.uName}</a></c:if>
												</td>
												<td>
													<a href="see/${all.drId}.html">
														<span class="label label-sm label-warning arrowed arrowed-righ">
															详细内容
														</span>
													</a>
												</td>
												<td><fmt:formatDate value="${all.drTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
												<td>${all.drType}</td>
												<td>${all.answers}</td>
												<td>${all.drBrowse}</td>
												<td>
													<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
														<a class="red" href="${all.drId}.html">
															<i class="icon-trash bigger-130"></i>
														</a>
													</div>
												</td>
											</tr>
										</c:forEach>
									</tbody>
								</table>
								
							</div>
							<div id="fengye">
								<ul id="fengul">
				                	<li>
			                		<form action="../diser/lis.html" method="post">
					                		<input type="hidden" name="key" value="${key}"/>
					                		<a href="#" type="submit">首页</a>
				                		</form>
				                	</li>
				                	<c:if test="${page.pageNum>1}">
				                		<li>
					                		<form action="../diser/lis.html" method="post">
						                		<input type="hidden" name="p" value="${page.pageNum-1}"/>
						                		<input type="hidden" name="key" value="${key}"/>
						                		<a href="#" type="submit">上一页</a>
					                		</form>
				                		</li>
				                	</c:if>
				                	<c:if test="${page.pageNum<page.pageCount}">
				                		<li>
					                		<form action="../diser/lis.html" method="post">
						                		<input type="hidden" name="p" value="${page.pageNum+1}"/>
						                		<input type="hidden" name="key" value="${key}"/>
						                		<a href="#" type="submit">下一页</a>
					                		</form>
				                		</li>
				                	</c:if>
				                </ul>
							</div>
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script src="<%=path%>/page/back/assets/js/jquery-2.0.3.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
		<script src="<%=path%>/page/back/assets/js/jquery-1.10.2.min.js"></script>
		<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='<%=path%>/page/back/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
		<script type="text/javascript">
		 window.jQuery || document.write("<script src='<%=path%>/page/back/assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
		</script>
		<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<%=path%>/page/back/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<!-- page specific plugin scripts -->

		<script src="<%=path%>/page/back/assets/js/jquery.dataTables.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/jquery.dataTables.bootstrap.js"></script>

		<!-- ace scripts -->

		<script src="<%=path%>/page/back/assets/js/ace-elements.min.js"></script>
		<script src="<%=path%>/page/back/assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			jQuery(function($) {
				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table');
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			});
		</script>
		
</body>
</html>